from typing import List


class Solution:
    def maxIncreasingSubarrays(self, nums: List[int]) -> int:
        n = len(nums)
        def check(k):
            dp = [1] * n
            for i in range(n - 2, -1, -1):
                if nums[i] < nums[i + 1]:
                    dp[i] = dp[i + 1] + 1
                if i <= n - k - 1:
                    if dp[i] >= k and dp[i + k] >= k:
                        return True
            return False
        l = 0
        r = n - 1
        while l <= r:
            mid = ((r - l) >> 1) + l
            if check(mid):
                l = mid + 1
            else:
                r = mid - 1
        return l - 1